import QtQuick 2.0
import QtQuick.Controls 2.0
import "."
Button {
    id: control

    property int btnHeight:30
    property int btnWidth:80

    width:80
    height:20

    text: qsTr("Button")
    font.family: View.mainFontFamily
    font.pointSize: View.mainFontSize

    contentItem: Text {
        text: control.text
        font: control.font
        //opacity: enabled ? 1.0 : 0.3
        color: control.down ? "gray" : enabled?View.mainColor:View.enableColor
        horizontalAlignment: Text.AlignHCenter
        verticalAlignment: Text.AlignVCenter
        elide: Text.ElideRight
    }

    background: Rectangle {
        implicitWidth: btnWidth
        implicitHeight: btnHeight
        //opacity: enabled ? 1 : 0.3
        border.color: control.down ? "gray" : (enabled?View.mainColor:View.enableColor)
        border.width: 1
        radius: 2
    }
}
